Merged
Conversation
6c26292 to
6f9634a
Compare
CompleteMultipartUpload will not delete MultipartUpload data, only the parts. This is only part of a fix, we really shouldn't delete parts at all and preserve all multipart data, streaming a full binary on getObject requests. Fixes #2586
0e6db31 to
2d6aab2
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements idempotent behavior for CompleteMultipartUpload operations, allowing the same multipart upload to be completed multiple times without error. The key changes preserve multipart upload metadata after completion and modify the completion logic to handle already-completed uploads.
- Add a
completedboolean field to track multipart upload state - Modify completion logic to handle already-completed uploads by returning cached results
- Update multipart store operations to differentiate between active and completed uploads
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| server/src/main/java/com/adobe/testing/s3mock/store/MultipartUploadInfo.java | Add completed field and helper methods to track multipart upload completion state |
| server/src/main/java/com/adobe/testing/s3mock/store/MultipartStore.java | Update store operations to handle completed uploads and preserve metadata after completion |
| server/src/main/java/com/adobe/testing/s3mock/service/MultipartService.java | Add includeCompleted parameter to verification methods for handling completed uploads |
| server/src/main/java/com/adobe/testing/s3mock/MultipartController.java | Implement idempotent completion logic by checking upload state and returning cached results |
| integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/MultipartIT.kt | Add integration test to verify idempotent behavior of CompleteMultipartUpload |
| Multiple pom.xml files | Update version from 4.7.1-SNAPSHOT to 4.8.0-SNAPSHOT |
| Multiple test files | Update test calls to match new method signatures with includeCompleted parameter |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ChecksumType.COMPOSITE | ||
| ); | ||
| FileUtils.deleteDirectory(partFolder.toFile()); | ||
| //delete parts and update MultipartInfo |
There was a problem hiding this comment.
The comment should use proper capitalization: 'Delete parts and update MultipartInfo'.
Suggested change
| //delete parts and update MultipartInfo | |
| // Delete parts and update MultipartInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CompleteMultipartUpload will not delete MultipartUpload data, only the parts.
This is only part of a fix, we really shouldn't delete parts at all and preserve all multipart data, streaming a full binary on getObject requests.
Related Issue
#2586
Tasks